package redis.redisDemo;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;
import redis.redisJarDemo.MyRedisConfigration;

/**
 * @Description
 * @Author zhoucq
 * @Date 2025/9/23 10:25
 * @Version 1.0
 * 继承 ImportSelector接口，完成 configuration的扫描
 */
public class DetinelmportSelector implements ImportSelector {

    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        //1. 完成了configration的扫描
        //2. 只需要把扫描到的configration的bean注册到容器中
        return new String[]{MyRedisConfigration.class.getName()};
    }
}
